<?php session_start();$_SESSION['page'] = 'search';?>
<?php
    $materialID = $_GET['materialID'];

    require('db_connection.php');
    $query = "SELECT * FROM tblcollection WHERE materialID='$materialID'";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array($result))
    {
        $callNo = $row['callNo'];
        $type = $row['type'];
        $title = $row['title'];
        $author = $row['author'];
        $ISBN = $row['ISBN'];
        $imgfilename = $row['imgfilename'];
        $subject = $row['subject'];
        $copyNo = $row['copyNo'];
        $noOfDays = $row['noOfDays'];
    }
?>

<!doctype html public "-//W3C//DTD HTML 4.01//EN">

<html>

   <head>
      <title>Catalog Detail</title>
      <meta http-equiv="generator" content="PHP Designer 2005" />
   </head>

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" class=''>
    <table width='80%' align='center' class='content' >
        <tr><td colspan='2'><img src='images/banner.jpg' /></td></tr>
            <tr><td align='right' colspan='2' class='logout'><?php require ('loginout.php');?></td></tr>
            <tr class='menuborder'><td width='90%'><img src='images/catdetail.png'></td><td><?php  require('buttons2.php'); ?></td></tr>
        <tr><td colspan='2'>
            <table width='100%' align='center' class='bodyborder'>
                <tr><td height='30'></td></tr>
                <?php
                    echo "<tr><td rowspan='9' align='center'><img height='100%' width='60%' src='images/catalog/$imgfilename'></td></tr>";
                    echo "<tr class='td1'><td width='20%'>Call No</td>";
                    echo "<td width='50%'>$callNo</td></tr>";
                    echo "<tr class='td2'><td>Type</td>";
                    echo "<td>$type</td></tr>";
                    echo "<tr class='td1'><td>Title</td>";
                    echo "<td><b>$title</b></td></tr>";
                    echo "<tr class='td2'><td>Author</td>";
                    echo "<td>$author</td></tr>";
                    echo "<tr class='td1'><td>ISBN</td>";
                    echo "<td>$ISBN</td></tr>";
                    echo "<tr class='td2'><td>Subject</td>";
                    echo "<td>$subject</td></tr>";
                    echo "<tr class='td1'><td>No of Copies</td>";
                    echo "<td>$copyNo</td></tr>";
                    echo "<tr class='td1'><td>No of Days to be Out</td>";
                    echo "<td>$noOfDays</td></tr>";
                  ?>
                  <tr><td height='30'></td></tr>
            </table>
        </td></tr>
        <tr><td align='center' colspan='2'><?php require ('copyright.php')?></td></tr>
    </table>
   </body>
</html>
